/*global: requirejs, require */
/**
 * app.js
 *
 * Distributed under terms of the MIT license.
 */

require.config({
    paths: {
        "Vue": "node_modules/vue/dist/vue",
        "VueRouter": "node_modules/vue-router/dist/vue-router",
        "vue": "node_modules/require-vuejs/dist/require-vuejs",
        "text": "node_modules/requirejs-text/text"

    },
    shim: {
        "Vue": {"exports": "Vue"}
    }
});

require(["Vue","VueRouter","text!components/bar.html", "vue!component"],
    function(Vue,VueRouter,Bar){
    Vue.use(VueRouter);

    var routes = [
        {path: '/foo', component: {template: '<my-component></my-component>'}},
        {path: '/bar', component: {template: Bar}}
    ];

    var router = new VueRouter({routes: routes});

    new Vue({router: router}).$mount('#app');
});